@extends('layouts.admin')
@push('morecss')
    <!-- orris -->
    <link href="{{ asset('/vendor/AdminInspinia/css/plugins/morris/morris-0.4.3.min.css') }}" rel="stylesheet">
@endpush

@push('morescript')
    <!-- ChartJS-->
    <script src="{{ asset('/vendor/AdminInspinia/js/plugins/chartJs/Chart.min.js') }}"></script>
    <script type="application/javascript">
        let page_params = {
            @can('admin.wxtjuser.summary')
            url_list: '{{ route('admin.wxtjuser.summary') }}',
            @endcan
        }
    </script>
    <!-- require page js -->
    <script src="{{ mix('js/admin/wxtjuser_summary.js') }}"></script>
@endpush
@section('content')
    <div class="wrapper wrapper-content animated fadeInRight ecommerce">
        <div class="ibox-content m-b-sm border-bottom">
            <div class="row">
                <div class="col-sm-2">
                    <div class="form-group">
                        <label class="control-label" for="event">用户渠道</label>
                        <select class="form-control input-s-sm inline" v-model="searchParams.user_resource">
                            @foreach($userSourceTypeList as $typeId => $typeName)
                                <option value="{{$typeId}}">{{$typeName}}</option>
                            @endforeach
                        </select>
                    </div>
                </div>
                <div class="col-sm-4">
                    <div class="form-group">
                        <div class="col-sm-12">
                            <div class="col-sm-6">
                                <label class="control-label" for="start_time">开始时间</label>
                                <div>
                                <vue-datepicker-local
                                        v-model="start_time"
                                        format="YYYY-MM-DD HH:mm:ss" clearable
                                        placeholder="开始时间"></vue-datepicker-local>
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <label class="control-label" for="end_time">结束时间</label>
                                <div>
                                <vue-datepicker-local
                                        v-model="end_time"
                                        format="YYYY-MM-DD HH:mm:ss" clearable
                                        placeholder="结束时间"></vue-datepicker-local>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-2">
                    <div class="form-group">
                        <label class="control-label" for="product_name">&nbsp;&nbsp;</label>
                        <div>
                            <button class="btn btn-primary" type="button" v-on:click="query"><i
                                        class="fa fa-search"></i>
                                搜索
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div id="toolbar" class="col-sm-5" style="width: 300px;">
        </div>
        <div class="row">
            <div class="col-lg-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>用户增减数据统计表格</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                            <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                                <i class="fa fa-wrench"></i>
                            </a>
                            <ul class="dropdown-menu dropdown-user">
                            </ul>
                            <a class="close-link">
                                <i class="fa fa-times"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <canvas id="barChart" height="140"></canvas>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection